import { createApp } from 'vue'
import store from './stores/store'
import App from './App.vue'
import router from './router'
import 'normalize.css'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 公共组件
import commonComponents from './components/library'
const app = createApp(App)
app.use(commonComponents)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(router)
app.use(ElementPlus, {
    locale: zhCn,
})
// 路由加载完成后挂载
router.isReady().then(() => {
    app.use(store).mount('#app')
})
